//
//  SearchViewController.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/17.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "SearchViewController.h"
#import "UIColor+Wonderful.h"

@interface SearchViewController ()

@end

@implementation SearchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"查找";

  
    UIBarButtonItem *item =[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"return"] style:UIBarButtonItemStylePlain target:self action:@selector(left:)];
    self.navigationItem.leftBarButtonItems = @[item];
    //设置在本页面返回的按钮为道蓝色;
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor doderBlue];
    
    //搜索游戏
    UITextField *field =[[UITextField alloc]initWithFrame:CGRectMake(0, 0, 220, 32)];
    field.backgroundColor =[UIColor gainsboroColor];
    field.layer.cornerRadius = 7;
    field.placeholder = @"                搜索游戏~";
    
    //有清除的X
    field.clearButtonMode = UITextFieldViewModeAlways;
    
    self.navigationItem.titleView = field;
    [field release];
    
    
    
}

- (void)left:(UIBarButtonItem *)btn
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
